Checking whether a frame is loaded

Use the _framesloaded property (within an If statement) or the If Frame Is Loaded statement to check whether the contents of a specific frame are available locally. A common use for _framesloaded or If Frame Is Loaded is to start playing a simple animation while the rest of the movie downloads to the local computer. The main difference between the two approaches is that the If (_framesloaded) statement allows you to add an Else or Else If statement to your action, quickly. The If Frame Is Loaded statement allows you to specify a specific number of frames in a simple statement.

To use the _framesloaded property in an action that plays a short animation loop while a movie finishes loading:

1 Create a short animation loop at the beginning of the movie. For example, you can create a loop that displays the message "Movie loading...".
2 Create a frame action with If Frame Is Loaded that jumps out of the animation loop after all the frames are loaded and continues playing the movie. For example, a movie that has a two-frame animation loop at the beginning would require the following action attached to Frame 2:
If (_framesloaded) 
	Go to and Play (3) 
Else 
	Go to and Play (1) 
End If 

To use the If Frame is Loaded statement in an action that plays a short animation while a movie finishes loading:

1 Create a short animation loop at the beginning of the movie. For example, you can create a loop that displays the message "Movie loading...".
2 Create a frame action with If Frame Is Loaded that jumps out of the animation loop when all the frames are loaded and continues playing the movie. For example, a 30 frame movie that has a two-frame animation loop at the beginning would require the following action attached to Frame 1:
If Frame Is Loaded (30)
	Go to and play (3)
End If Frame Is Loaded
When you insert an If Frame is Loaded statement, Flash automatically inserts an End If Frame is Loaded statement at the end.
3 For Frame 2, attach the following action, which restarts the movie at frame 1:
Go to and play (1)
When the frame specified in the If Frame is Loaded statement is loaded, the movie skips the second frame and continues playing the movie from the third frame.

The If Frame is Loaded statement is also useful for a section in a movie that requires loading a large bitmap or sound file.

Typically, If Frame Is Loaded is a condition for a frame action, but you can also use it as a button action. To test an If Frame Is Loaded condition, use the Streaming option with the Test Movie command. The frames load in the same way as they would if streaming from a web site. See Testing movie download performance.

The If Frame Is Loaded statement has the following parameters:

Frame specifies the frame number of the frame label you want loaded locally before the next statement is executed.
Scene is the scene containing the specified frame.